<?php

namespace app\mini\controller\v1\client\validate;


use think\Validate;

class ServiceValidate extends Validate
{
    protected $rule = [
        'id'      => 'require',
        'type'      => 'require',
        'name'      => 'require|max:50',
        'car_age'      => 'require|float',
        'mileage'      => 'require|float',
        'phone'      => 'require',
        'price'      => 'require|float',
        'detail'      => 'require',
        'cover_img'      => 'require',
        'main_business'      => 'require',
        'province'      => 'require',
        'city'      => 'require',
        'districts'      => 'require',
        'address'      => 'require',
        'longitude'      => 'require',
        'latitude'      => 'require',
        'service_type'      => 'require',
    ];

    protected $message = [
        'type.require'      => 'type必填',

    ];

    protected $scene = [
        'index'  => [],
        'car_edit'  => ['name', 'car_age','mileage','phone','price','detail','cover_img'],
        'edit'  => ['type','name', 'main_business','province','phone','city','districts','address','longitude','latitude','detail','cover_img'],
        'put_up'  => ['service_type','id'],
        'put_down'  => ['service_type','id'],
        'del'  => ['service_type','id'],
    ];
}